home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Bus / T-Z / Wingz Utilities.cpt / HyperHelp 3.0.SIT / HyperHelp (.txt) next >
Encoding:
Wingz Script  |  1989-11-15  |  26.2 KB  |  642 lines  |  [WZSC/WNGZ]

  1. WNGZWZSC0110\Q
  2. HyperScript
  3. HyperRef
  4. HyperScript Commands
  5. @HyperScript
  6. E@vents
  7. @Repaint
  8. @Scripts
  9. ToolBo@x
  10.     Co@ntrols
  11. Dialo@gs
  12. @Draw
  13. @Menus
  14. @Objects
  15. @File
  16. Ed@it
  17. Re@port
  18. Se@lect
  19. Windows
  20. @Charts
  21. Fi@elds
  22. Form@at
  23. @Text
  24. Wor@ksheets
  25.     Category@
  26. on mouseup HyperHelp:temp = CTSTRING(1,0) 
  27.             if HyperHelp:temp <> HyperHelp:lastcat
  28.                 HyperHelp:lastcat = HyperHelp:temp
  29.                 call HyperHelp:List(HyperHelp:lastcat) 
  30.             end if
  31.            end mouseup
  32. List@
  33. Monaco
  34. bious
  35. COMMAND
  36. PAGE(S)@5
  37. Monaco
  38. Bious
  39. Eon mouseup 
  40.             call HyperHelp:Example(CTVALUE(2,0)) 
  41.            end mouseup
  42. Example@
  43. Monaco
  44. Sort@
  45. call HyperHelp:SortList()
  46. Find Next@
  47. Help@
  48. call HyperHelp:Copy()
  49. call HyperHelp:Search()
  50.     Find Next
  51. call HyperHelp:FindIt()
  52. call HyperHelp:Help()
  53. quit dialog box 
  54.              go to window "HyperRef"
  55.            if NAME() = "HyperRef"        { make sure we're closing the correct sheet! }
  56.             close now
  57.            end if 
  58.                 repaint on
  59.     Category:
  60.     HyperHelp
  61. Geneva
  62. Version 3.0
  63. Geneva
  64. Example
  65.  PLEASE WAIT
  66. HyperRef
  67. HyperScript Commands
  68. Example
  69. Example
  70.  please select a command from the list or choose a new category 
  71. Copy to Clipboard
  72. Cancel@
  73. PHyperHelp:ok = 1
  74.            HyperHelp:c = CTVALUE(5,1)
  75.            HyperHelp:x = CTVALUE(5,2)
  76. Command
  77. Example
  78. Find Entry Containing
  79. Cancel@
  80. 9HyperHelp:ok = 1
  81.            HyperHelp:searchfor = CTSTRING(4,0)
  82.     Find Next
  83. Example
  84.  PLEASE WAIT
  85. HyperRef
  86. find text "
  87. HyperScript Commands
  88.     Find Next
  89. Example
  90. HyperScript Commands
  91.     Find Next
  92. About HyperHelp
  93. Geneva
  94. XHyperHelp
  95. version 3.0, November 15, 1989
  96. by: Paul T. Christensen and Keith H. Brown
  97. HyperHelp provides an on-line reference to the HyperScript language, supplementing information contained in the Wingz version 1.1 manuals.
  98. A scrollable list of HyperScript commands is located in the center of the HyperHelp window. Use the buttons located above this list to display a different command category. Select an entry from the list to see an example of how it might be used.
  99. Text shown within brackets is optional. For example, "SELECT [MORE] GRAPHICS" represents the commands "SELECT GRAPHICS" and "SELECT MORE GRAPHICS". XYZ
  100. TUnless otherwise noted, page numbers apply to the Wingz 1.1 HyperScript manual.
  101. When the SORT option is checked, the command list is displayed alphabetically. When unchecked, commands are listed in logical groups.
  102. Use the COPY
  103.  button to transfer the current command and/or example to the Clipboard.
  104. The FIND
  105.  button allows the entire command database to be searched for the first item (command, page, or example) that matches a specified set of characters. XYZ
  106. UTo locate the next item using the same search pattern, click on the FIND NEXT button.
  107. cmdwidth
  108. pagewidth
  109. listwidth
  110. lastcat
  111. lastex
  112. searchfor
  113. searchat
  114. found
  115. Hyper
  116. SortList
  117. Examplel    
  118. Copyz
  119. Search
  120. FindIt
  121. Help\
  122. {    ------------------------------------------
  123.     HyperHelp
  124.     version 3.0, November 15, 1989
  125.     by: Paul T. Christensen and Keith H. Brown
  126.     ------------------------------------------
  127.     HyperHelp provides a handy on-line reference to the commands in 
  128.     the Wingz
  129.  HyperScript language, supplementing the information
  130.     found in the Wingz 1.1 HyperScript manual. When properly installed 
  131.     and activated, this script generates a modeless dialog box that can 
  132.     remain open along with your sheets and scripts.  You can switch 
  133.     between your open scripts and the HyperHelp reference using the
  134.     Window menu.
  135.     HyperScript commands are arranged into 20 different categories that
  136.     can be selected by using the radio buttons at the top of the dialog.
  137.     Normally, each category list is arranged into logical groupings of 
  138.     commands. However, you can sort the entire category alphabetically
  139.     using the SORT check box.
  140.     By clicking on an item from the list, you can display an example of 
  141.     how the selected command might be used. Because of typographical
  142.     errors, TRY THE EXAMPLE if it seems to contradict the documentation.
  143.     You can copy the command and/or example to the clipboard using the 
  144.     COPY
  145.  button.
  146.     The FIND
  147.  button allows you to search for the FIRST entry (starting
  148.     from the top of the HyperRef file) that contains the search string you 
  149.     specify. The appropriate category is chosen, and the entry and example 
  150.     are highlighted for you. To search for the next occurence of the same 
  151.     string, use the FIND NEXT button. Note that FIND
  152. and FIND NEXT will
  153.     match text in the command, page, or example portions of each entry.
  154. IMPORTANT
  155. ---------
  156.     Because of the critical nature of dialog control spacing and HyperHelp's
  157.     use of control sorting and naming, this script REQUIRES WINGZ VERSION 1.1.
  158.     DO NOT CHANGE THE FILENAME OF THIS SCRIPT ("HyperHelp")
  159.     OR THE NAME OF ITS REFERENCE FILE ("HyperRef")!
  160. Suggestions for INSTALLATION:
  161. ----------------------------
  162.     Copy this file ("HyperHelp") AND its reference worksheet ("HyperRef") 
  163.     into the same folder as the Wingz application.
  164.     Create a new script named "Startup" containing the following lines 
  165.     and place it in the same folder as the Wingz application.  Or, if 
  166.     you already have a Startup file, add these lines to the end of it:
  167.         if file("HyperHelp") and file("HyperRef")
  168.             get script "HyperHelp"
  169.             select menu "Script"
  170.             add menu separator
  171.             add menuitem "HyperScript Help
  172. "  command "@call HyperHelp:Hyper()"
  173.         end if
  174.     To browse the "HyperRef" file, close ALL windows, open HyperRef (it's a Wingz
  175.     worksheet), and choose "Arrange Windows" from the Window menu. Two buttons on
  176.     the sheet will allow you to print the file and show some notes on its operation.
  177. Functions defined by HyperHelp:
  178. -------------------------------
  179.  Hyper()
  180.         main function which opens the reference file and builds the dialog box
  181.  SortList()
  182.         called each time the SORT check box is toggled; turns control sorting
  183.         on or off; re-selects the top list box item
  184.  List(rnge)
  185.         replaces all list box items with the entries of the category RNGE
  186.  Example(row)
  187.         displays the example text for the command on the specified ROW in the 
  188.         list box
  189.  Copy()
  190.         generates a dialog box with check boxes for command and example; then
  191.         copies the currently selected command and/or example to the clipboard
  192.         based on the state of the check boxes
  193.  Search()
  194.         displays a dialog prompting the user for a search string; resets search
  195.         pointer to the beginning of the command reference; then calls FindIt()
  196.  FindIt()
  197.         routine searches the command reference from the current search pointer
  198.         using the current search string; if a match is found, the appropriate
  199.         category button is selected, the list is built, and the matching entry
  200.         is highlighted
  201.  fix(str)
  202.         takes all instances of quote marks and replaces them with double-quote
  203.         marks, allowing the returned string to be used in a HyperScript search
  204.         command; this routine was copied from the Wingz 1.1 DG file
  205.  Help()
  206.         displays a dialog with text describing HyperHelp's options
  207. Revision History
  208. ----------------
  209. version 3.0, November 15, 1989, Paul T. Christensen
  210.     - added SORT check box to sort the list alphabetically instead of logically
  211.     - modified List() and Example() functions to properly handle examples with SORT on
  212.     - added COPY
  213.  button and Copy() routine to transfer the current command and/or 
  214.       example to the Clipboard
  215.     - added FIND
  216.  and FIND NEXT buttons, added Search() and FindIt() routines to 
  217.       search the entire HyperRef file for items that match a specified search string
  218.     - added support for FIND mode to the List() routine 
  219.     - modified List() to right-justify page references and display "Please Wait" message
  220.     - changed Help() window placement and rewrote the help text
  221.     - now retains settings for category, sort, and search string
  222.     - now checks the worksheet NAME() before closing it to avoid accidentally closing
  223.       a user's window instead of the HyperRef sheet
  224.     - renamed idx() to List(); exmple() to Example()
  225.     - optimized code and converted variables from global to local where possible
  226.     - updated installation instructions, documentation, and worksheet note
  227.     - renamed "HyperScript_Ref" to "HyperRef" to distinguish from previous versions
  228.     - COMPLETELY rebuilt HyperRef: added new commands from Wingz 1.1, re-organized
  229.       and renamed categories, organized items logically within each category; 
  230.       corrected all known errors; added category list to the beginning of the file.
  231.     - merged Database category into Worksheet; added HyperScript category and merged 
  232.       Functions and Sound entries into it; added File and Edit categories; renamed 
  233.       Print to Report, Toolbox to ToolBox, changed Event, Script, Control, Dialog,
  234.       Menu, Object, Window, Chart, Field, and Worksheet to their plural names
  235. version 2.5, September 21, 1989, Paul T. Christensen (never released publicly)
  236.     - updated control spacing and dialog repainting to work with Wingz version 1.1
  237.     - example field now displays help text if no entry is selected in the list box
  238. version 2.4, June 22, 1989, Keith H. Brown
  239.     - added additional controls to HyperScript_Ref for printing and notes
  240.     - changed name of reference sheet from "HyperScript Ref" to "HyperScript_Ref"
  241.       to allow variable to be defined in the sheet script
  242.     - removed an extraneous range name "Foo" from HyperScript_Ref
  243. version 2.3, June 22, 1989, Paul T. Christensen
  244.     - fixed a potentially disastrous bug where clicking on the OK button might
  245.       close a user's worksheet without saving instead of closing "HyperScript Ref"
  246.       Kudos to Steve Schroader for finding this bug-a-boo.
  247.     - corrected page setup, print area, sheet reduction, and font problems in 
  248.       "HyperScript Ref"; expanded note description and reorganized some items
  249. version 2.2, June 19, 1989, Paul T. Christensen
  250.     - added title and version number to dialog box
  251.     - changed category names: "Drawing" to "Draw", "Printing" to "Print"
  252.     - added explanatory text block (note) to "HyperScript Ref"
  253.     - verified "HyperScript Ref"; added missing commands; improved organization;
  254.       added missing commands; corrected errors
  255.     - checked and corrected ALL examples by compiling their text!
  256.     - corrected minor error in the installation instructions
  257. version 2.1, June 12, 1989, Keith H. Brown
  258.     - disabled text field in the Help dialog box
  259. version 2.0, June 9, 1989, Paul T. Christensen
  260.     - redesigned dialog: moved OK and Help buttons next to each other; made list
  261.       longer, now uses Monaco 9 plain (holds 56 characters)
  262.     - examples are automatically displayed when a category is selected and when
  263.       an entry is selected from the list box.  If the example entry in the 
  264.       reference file contains a single quote, a copy of the command is used
  265.     - minimized dialog repainting by checking to see if the radio button was the
  266.       same as the last button chosen
  267.     - redesigned help box: removed scroll bar, reworded help text, used Geneva 9
  268.     - assigned quick key shortcuts to most items in the dialog box
  269.     - added error handler to trap for "worksheet already open" errors. This is
  270.       required because the "HyperScript Ref" file is not closed if the user 
  271.       uses the modeless dialog close box instead of the OK button.
  272.     - "HyperScript Ref" has been extensively rebuilt. Now, commands are listed 
  273.       with the parameter names, errors have been corrected, commands have been
  274.       added, and organization has been improved.
  275.     - merged Constructs button with Functions; merged Distribution, Matrix, and
  276.       What_If buttons into the Worksheet category
  277.     - added Object, Repaint, Select, and Text categories/buttons
  278.     - renamed files to "HypHelp" and "HyperScript Ref"
  279. version 1.1, May 29, 1989, Keith H. Brown
  280.     - displays an example when a command is double-clicked
  281.     - repaints list box instead of entire dialog
  282. version 1.0, May 26, 1989, Keith H. Brown
  283.     - initial public release
  284. define cmdwidth,pagewidth,listwidth
  285. define sort,lastcat,lastex,searchfor,searchat,found
  286. define ok,temp,r,c,x
  287. function Hyper()
  288.     cmdwidth = 56        { maximum width of command description in characters }
  289.     pagewidth = 19        { maximum width of page number reference in characters }
  290.     listwidth = cmdwidth + pagewidth + 1    { width of list box = command & space & page }
  291.     if lastcat = "" or lastcat = 0        { if never called before, set first category }
  292.         lastcat = "HyperScript"
  293.     end if
  294.     open "HyperRef"    { Load the reference file if it isn't already open }
  295.     new modeless dialog box "HyperScript Commands" at (-1,-1) (9680,5710)
  296.     { Control #1: "Category" Radio buttons }
  297.     add radio button "@HyperScript","E@vents","@Repaint","@Scripts","ToolBo@x",
  298.         "Co@ntrols","Dialo@gs","@Draw","@Menus","@Objects" at (1650,72) +(7900,1600)
  299.     add radio button items "@File","Ed@it","Re@port","Se@lect","Windows",
  300.         "@Charts","Fi@elds","Form@at","@Text","Wor@ksheets"
  301.     control name "Category@"
  302.     hide control name
  303.     no line border
  304.     select control item lastcat
  305.     script "on mouseup HyperHelp:temp = CTSTRING(1,0) 
  306.             if HyperHelp:temp <> HyperHelp:lastcat
  307.                 HyperHelp:lastcat = HyperHelp:temp
  308.                 call HyperHelp:List(HyperHelp:lastcat) 
  309.             end if
  310.            end mouseup"
  311.     { Control #2: "List" box }
  312.     add list box "" at (40,1800) +(9600,2800)
  313.     control name "List@"
  314.     hide control name
  315.     text font "Monaco"
  316.     text size 9
  317.     text style "bious"
  318.     show scroll bar list box
  319.     show control title "COMMAND"&REPEAT(" ",48)&"PAGE(S)@"
  320.     control title text font "Monaco"
  321.     control title text style "Bious"
  322.     control title text size 9
  323.     control title text color BLUE()
  324.     script "on mouseup 
  325.             call HyperHelp:Example(CTVALUE(2,0)) 
  326.            end mouseup"
  327.     { Control #3: "Example" field }
  328.     add field at (80,5350) +(9530,300)
  329.     control name "Example@"
  330.     field left margin 3
  331.     text font "Monaco" text size 9
  332.     disable control
  333.     { Control #4: Sort check box }
  334.     add check box "Sort@" at (100,1400) +(900,300)
  335.     no line border
  336.     script "call HyperHelp:SortList()"
  337.     if sort
  338.         check box 1
  339.         select control "List"
  340.         control sorting on
  341.     end if
  342.     { Controls 5,6,7,8,9: Copy
  343. , Find
  344. , Find Next, Help, and OK buttons }
  345.     add push button "Copy
  346. @","Find
  347. @","Find Next@","Help@","OK@" 
  348.         at (100,4750) +(9400,420)
  349.     select control "Copy
  350.     script "call HyperHelp:Copy()"
  351.     select control "Find
  352.     script "call HyperHelp:Search()"
  353.     select control "Find Next"
  354.     script "call HyperHelp:FindIt()"
  355.     if searchfor = "" or searchfor = 0        { grey FIND NEXT if no valid search string }
  356.         grey control
  357.         searchfor = ""
  358.     end if
  359.     select control "Help"
  360.     script "call HyperHelp:Help()"
  361.     select control "OK"
  362.     dialog default push button
  363.     script "quit dialog box 
  364.              go to window ""HyperRef""
  365.            if NAME() = ""HyperRef""        { make sure we're closing the correct sheet! }
  366.             close now
  367.            end if 
  368.                 repaint on"
  369.     add text "Category:" at (100,100) +(1400,300)
  370.     no line border
  371.     add text "HyperHelp" at (100,600) +(1000,260)
  372.     text font "Geneva"  text size 9  text color BLUE()
  373.     no line border
  374.     add text "Version 3.0" at (100,850) +(1300,260)
  375.     text font "Geneva"  text size 9  text color BLUE()
  376.     no line border
  377.     call List(lastcat)
  378.     use dialog box
  379. end function    { Hyper() }
  380. function SortList()
  381.     select control "List"
  382.     if not sort
  383.         sort = 1
  384.         control sorting on                { sort the list alphabetically }
  385.         top list box item 1                { display and select first item in list }
  386.         select control item 1
  387.         call Example(-1)
  388.     else
  389.         sort = 0
  390.         control sorting off
  391.         call List(CTSTRING(1,0))            { rebuild list box items with original order }
  392.     end if
  393. end function     { SortList() }
  394. function List(rnge)
  395. define c,rows,cols,i,starting,ending,cmd,page,builditem,founditem
  396.     if not found                        { display status message while building list }
  397.         select control "Example"
  398.         align center
  399.         text color RED()
  400.         field text "
  401.  PLEASE WAIT
  402.     end if
  403.     repaint off                        { we don't want to watch the list box being built }
  404.     invalidate on                        { remember the areas that will need repainting }
  405.     go to window "HyperRef"
  406.     select range rnge
  407.     r = ROWOF(SELECTION(1))
  408.     c = COLOF(SELECTION(1))
  409.     rows = ROWS(SELECTION(1)) - 1
  410.     cols = COLS(SELECTION(1)) - 1
  411.     go to window "HyperScript Commands"
  412.     select control "List"
  413.     starting = r
  414.     ending = (r + rows)
  415.     for i = starting to ending
  416.         page = INDIRECT(MAKECELL(c+1,i))
  417.         if ISNUMBER(page)            { convert page numbers to strings for LENGTH function }
  418.             page = STR(page)
  419.         end if
  420.         cmd = LEFT(INDIRECT(MAKECELL(c,i)),cmdwidth)        { Truncate commands that are too long }
  421.         page = LEFT(page,pagewidth)                    { Truncate long page references }
  422.         builditem = cmd & REPEAT(" ",listwidth - (LENGTH(cmd)+LENGTH(page))) & page & "   "
  423.             & i - starting + 1            { append real index to worksheet in case we SORT }
  424.         if not found or (found and rnge <> lastcat)    { Don't redo list on FIND in same category }
  425.             if i = r                    { first entry replaces all list items }
  426.                 list box items builditem
  427.             else                        { add items to the list }
  428.                 add list box items builditem
  429.             end if
  430.         end if
  431.         if i = searchat and found        { make note of the list box entry on FIND operation }
  432.             founditem = builditem
  433.         end if
  434.     end for
  435.     if found                            { display and select entry that was FOUND }
  436.         top list box item founditem
  437.         select control item founditem
  438.     else
  439.         select control item 1            { 
  440. otherwise, select the first list item }
  441.     end if
  442.     lastex = -1                        { force drawing of first example item }
  443.     select control "Example"
  444.     align left
  445.     text color BLACK()
  446.     if found
  447.         found = 0
  448.         call Example(CTVALUE(2,0))        { display example for FOUND entry }
  449.     else
  450.         call Example(1)                { 
  451. otherwise, display example for first item }
  452.     end if
  453. end function    { List(rnge) }
  454. function Example(row)
  455. define content
  456.     if row <> lastex    { Change example entry ONLY if it's changed since last filled }
  457.         lastex = row
  458.         if sort        { For SORT mode, grab the real index from the end of the list entry }
  459.             row = VALUE(MID(CTSTRING(2,0),listwidth+3,3))
  460.         end if
  461.         select control "Example"
  462.         if row <> 0
  463.             content = INDIRECT(MAKECELL(3,r+(row-1)))
  464.             if content = "'"  field text INDIRECT(MAKECELL(1,r+(row-1)))
  465.             else field text content
  466.             end if
  467.         else
  468.             field text " 
  469.  please select a command from the list or choose a new category 
  470.         end if
  471.     end if
  472.     invalidate off                    { now we can draw all the changes that have happened }
  473. end function    { Example(row) }
  474. function Copy()
  475. define cmd,ex
  476.     if not c and not x
  477.         c = 1
  478.     end if
  479.     new modal dialog box at (-1,-1) (4900,1500)
  480.     add text "Copy to Clipboard
  481. " at (100,50) (3000,450)
  482.     no line border
  483.     add text "line" at (100,450) (3500,470)
  484.     add push button "OK@","Cancel@" at (4000,50) (4500,1350)
  485.     dialog cancel push button
  486.     select control 3  dialog default push button
  487.     script "HyperHelp:ok = 1
  488.            HyperHelp:c = CTVALUE(5,1)
  489.            HyperHelp:x = CTVALUE(5,2)"
  490.     add check box "Command","Example" at (300,650) (2500,1400)
  491.     no line border
  492.     if c  check box 1  end if
  493.     if x  check box 2  end if
  494.     ok = 0
  495.     use dialog box
  496.     if ok and (c or x)
  497.         cmd = TRIM(LEFT(CTSTRING(2,0),cmdwidth))
  498.         ex = TRIM(CTSTRING(3,0))
  499.         new worksheet "" location (100inch,100inch) (100inch,100inch)
  500.         if c 
  501.             put cmd into A1
  502.             if x
  503.                 put ex into A2
  504.             end if
  505.         elseif x
  506.             put ex into A1
  507.         end if
  508.         select active cells
  509.         copy
  510.         close now
  511.     end if
  512. end function     { Copy() }
  513. function Search()
  514.     new modal dialog box at (-1,-1) (5300,1350)
  515.     add text "Find Entry Containing
  516. " at (100,250) (3500,650)
  517.     no line border
  518.     add push button "OK@","Cancel@" at (4400,50) (4900,1350)
  519.     dialog cancel push button
  520.     select control 2  dialog default push button
  521.     script "HyperHelp:ok = 1
  522.            HyperHelp:searchfor = CTSTRING(4,0)"
  523.     add field at (100,850) (3700,1250)
  524.     field word wrap off
  525.     field text searchfor
  526.     maximum field length 200
  527.     ok = 0
  528.     use dialog box
  529.     if ok
  530.         if searchfor = ""
  531.             select control "Find Next"
  532.             grey control
  533.         else
  534.             searchat = 23                { start our search at the beginning of the entries }
  535.             call FindIt()                { perform the actual search }
  536.         end if
  537.     end if
  538. end function    { Search() }
  539. function    FindIt()
  540. define loop,cat
  541.     select control "Example"                { display status message while searching HyperRef }
  542.     align center
  543.     text color RED()
  544.     field text "
  545.  PLEASE WAIT
  546.     go to window "HyperRef"
  547.     select range MAKECELL(3,searchat)        { start search from example field to avoid "double hits" }
  548.     run "find text """&fix(searchfor)&""""
  549.     if NRSELECTIONS() = 0 or ROWOF(SELECTION(1)) < INDIRECT(MAKECELL(2,2))
  550.        or ROWOF(SELECTION(1)) > INDIRECT(MAKECELL(3,21))        { Failed Search }
  551.         select range lastcat
  552.         go to window "HyperScript Commands"
  553.         select control "Find Next"
  554.         grey control
  555.         lastex = -1                    { force drawing of first example item }
  556.         select control "Example"            { re-display example text }
  557.         align left
  558.         text color BLACK()
  559.         call Example(CTVALUE(2,0))
  560.     else                                { search was successful
  561.  currently on the found row }
  562.         searchat = ROWOF(SELECTION(1))
  563.         loop = 2                        { identify the category using start of HyperRef }
  564.         while searchat > INDIRECT(MAKECELL(3,loop))
  565.             loop = loop + 1
  566.         end while
  567.         cat = INDIRECT(MAKECELL(1,loop))
  568.         go to window "HyperScript Commands"
  569.         select control 1
  570.         select control item cat
  571.         found = 1
  572.         call List(cat)
  573.         lastcat = cat
  574.         select control "Find Next"
  575.         ungrey control
  576.     end if
  577. end function    { FindIt() }
  578. function fix(s0)
  579. define i,c,l,s1
  580.     s1=""
  581.     l=length(s0)
  582.     for i=1 to l
  583.         c=mid(s0,i-1,1)
  584.         s1=s1&c
  585.         if c=""""            { Replace quotes with two double quotes for HyperScript search }
  586.             s1=s1&""""
  587.         end if
  588.     end for
  589.     return s1
  590. end function    { fix(so) }
  591. function Help()
  592.     new modal dialog box at (-1,-1) (7300,4120)
  593.     add text "About HyperHelp
  594. " at (100,200) +(3000,400)
  595.     no line border
  596.     add push button "OK@" at (6000,100) +(1200,450)
  597.     dialog default push button
  598.     add field at (50,750) +(7200,3320)
  599.     field single font
  600.     text font "Geneva"
  601.     text size "9"
  602.     field justification flush
  603.     field right margin 5 points
  604.     field left margin 5 points
  605.     field top margin 5 points
  606.     field bottom margin 3 points
  607.     show scroll bar field
  608.     field text "HyperHelp"&char(13)&"version 3.0, November 15, 1989"&char(13)&
  609.         "by: Paul T. Christensen and Keith H. Brown"&char(13)&char(13)&"XYZ"
  610.     replace field text "XYZ" with "HyperHelp provides an on-line reference to the HyperScript "&
  611.         "language, supplementing information contained in the Wingz version 1.1 manuals."&
  612.         char(13)&char(13)&"XYZ" options "Aw"
  613.     replace field text "XYZ" with "A scrollable list of HyperScript commands is located in the "&
  614.         "center of the HyperHelp window. Use the buttons located above this list to display a "&
  615.         "different command category. Select an entry from the list to see an example of "&
  616.         "how it might be used."&char(13)&char(13)&"XYZ" options "Aw"
  617.     replace field text "XYZ" with "Text shown within brackets is optional. For example, "&
  618.         """SELECT [MORE] GRAPHICS"" represents the commands ""SELECT GRAPHICS"" and ""SELECT "&
  619.         "MORE GRAPHICS"". "&"XYZ" options "Aw"
  620.     replace field text "XYZ" with "Unless otherwise noted, page numbers apply to the Wingz 1.1 "&
  621.         "HyperScript manual."&char(13)&char(13)&"XYZ" options "Aw"
  622.     replace field text "XYZ" with "When the SORT option is checked, the command list is displayed "&
  623.         "alphabetically. When unchecked, commands are listed in logical groups."&char(13)&char(13)&
  624.         "XYZ" options "Aw"
  625.     replace field text "XYZ" with "Use the COPY
  626.  button to transfer the current command and/or "&
  627.         "example to the Clipboard."&char(13)&char(13)&
  628.         "The FIND
  629.  button allows the entire command database to be searched for the first item "&
  630.         "(command, page, or example) that matches a specified set of characters. "&"XYZ" options "Aw"
  631.     replace field text "XYZ" with "To locate the next item using the same search pattern, click "&
  632.         "on the FIND NEXT button." options "Aw"
  633.     select field text from 0 to 0
  634.     lock field text
  635.     use dialog box
  636. end function    { Help() }
  637. on error
  638.     if LERROR() <> 1025            { ignore "Worksheet already open" errors }
  639.         message SERROR()
  640.     end if
  641. end error
  642.